//
//  ZLBaseTableItem.m
//
//  Created by Jiaozl on 2022/5/26.
//  Copyright © 2022 Jiaozl. All rights reserved.
//

#import "ZLBaseTableItem.h"
#import "ZLFunctionMacro.h"

@interface ZLBaseTableItem ()

@end

@implementation ZLBaseTableItem

#pragma mark - Getter

- (ZLInstanceType  _Nonnull (^)(NSString * _Nonnull, ZLBaseCallBackBlock _Nonnull))zlinit {
    if (!_zlinit) {
        weakify(self);
        _zlinit = ^(NSString * _Nonnull title, ZLBaseCallBackBlock block) {
            strongify(self);
            self.title = title;
            self.block = ^(ZLInstanceType model) {
                NSLog(@"调用了 %@", model.title);
                if (block) {
                    block(model);
                }
            };
            return self;
        };
    }
    return _zlinit;
}

@end
